package ru.spb.osll.myfit.client.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import ru.spb.osll.myfit.common.ExecutingResult;
import ru.spb.osll.myfit.common.MetadataColumnDef;
import ru.spb.osll.myfit.common.PageExecutingResult;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("executing")
public interface PageExecutingService extends RemoteService {

  public PageExecutingResult executePage(String pagePath, Map<String, String> testRunMetadata);

  public PageExecutingResult getExecutingResult(String id);

  public List<PageExecutingResult> getExecutingResultsBatch(Set<String> ids);

  public Set<PageExecutingResult> getResultHeadersBatch(Set<String> ids);

  public Set<PageExecutingResult> getTestResults(String filtersString);
  
  public Set<? extends ExecutingResult> getTestResultHeaders(String filtersString);

  void saveMetadata(Map<String, String> metadata, String id);

  public List<MetadataColumnDef> getMetadataColDef();
}
